<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { defineAsyncComponent, ref } from 'vue'

const OrderDetail = defineAsyncComponent(() => import('@/components/rescue/OrderDetail.vue'))

// 从路由参数中获取 orderId
const orderId = ref<number | undefined>(undefined)

onLoad((options) => {
  if (options?.orderId) {
    orderId.value = Number(options.orderId)
  }
})
</script>

<template>
  <OrderDetail :model-value="true" :order-id="orderId" />
</template>
